% Minimal color is the color with the minimal component
% and the largest gap to the folowing
function [c, I] = selectMinimalColor(colors)


p = sqrt(sum(colors .* colors,2));
[~,I] = min(p);
c = colors(I,:);


%deltas = [];
%cinds = [];
%for cIdx = 1:3
%    c = colors(:,cIdx);
%    [values, inds] = sort(c);
%    smc = colors(inds,:);
%    delta = smc(2) - smc(1);    
%    deltas(cIdx) = delta;
%    cinds(cIdx) = inds(1);
%end
%[d, I] = max(deltas);
%c = colors(cinds(I),:);
%I = cinds(I);







